function menuOver(obj) {
   var pos = parseInt(obj.getAttribute('pos')) * 2 + 1;
   var imgs = obj.parentNode.getElementsByTagName('IMG');
   var basename = obj.getAttribute('basename');
   var sel0 = '';
   var sel2 = '';
   
   if (pos != 1) {
      if(imgs[pos-2].parentNode.getAttribute('sel') == '1') {
         sel0 = 'Sel';
      }
   }
   
   if (pos != imgs.length - 2) {
      if(imgs[pos+2].parentNode.getAttribute('sel') == '1') {
         sel2 = 'Sel';
      }   
   }
   
   imgs[pos-1].src = 'img/sistema/menus/mnu' + basename + '0Over' + sel0 + '.gif';
   imgs[pos].src = 'img/sistema/menus/mnu' + basename + '1Over.gif';
   imgs[pos+1].src = 'img/sistema/menus/mnu' + basename + '2Over' + sel2 + '.gif';
}

function menuOut(obj) {
   var pos = parseInt(obj.getAttribute('pos')) * 2 + 1;
   var imgs = obj.parentNode.getElementsByTagName('IMG');
   var basename = obj.getAttribute('basename');
   var img0 = 'img/sistema/menus/mnu' + basename + '0.gif';
   var img2 = 'img/sistema/menus/mnu' + basename + '2.gif';
   
   if (pos != 1) {
      if(imgs[pos-2].parentNode.getAttribute('sel') == '1') {
         img0 = 'img/sistema/menus/mnu' + imgs[pos-2].parentNode.getAttribute('basename') + '2Over.gif';
      }
   }
   
   if (pos != imgs.length - 2) {
      if(imgs[pos+2].parentNode.getAttribute('sel') == '1') {
         img2 = 'img/sistema/menus/mnu' + imgs[pos+2].parentNode.getAttribute('basename') + '0Over.gif';
      }   
   }
   
   imgs[pos-1].src = img0;
   imgs[pos].src = 'img/sistema/menus/mnu' + basename + '1.gif';
   imgs[pos+1].src = img2;
}

